import { Component, OnInit, EventEmitter, Input, Output, ElementRef } from '@angular/core';

import { CudTableService } from '../../../public/serve/cud-table/cud-table.service';
import { Service } from '../../../server/server';
declare var $: any;

@Component({
  selector: 'app-institution-details',
  templateUrl: './institution-details.component.html',
})
export class InstitutionDetailsComponent implements OnInit {

  constructor(private server: Service) { }

  ngOnInit() {
    //首次进入接受tree数据
    this.institutiontreeidnameeventEmit = this.server.institutiontreeidnameeventEmit.subscribe((value: any) => {
      this.superiorDetails = value.institutionName;
    })
  }

  //取消订阅
  public institutiontreeidnameeventEmit: any;
  ngOnDestroy() {
    if (this.institutiontreeidnameeventEmit) {
      this.institutiontreeidnameeventEmit.unsubscribe();
    }
  }

  @Input() getTabVal: any;

  @Input() superiorDetails: any;

}
